﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;

namespace QLInternet.Components
{
    class DelegateCommand: ICommand
    {
        private readonly Action action;

        public DelegateCommand(Action a)
        {
            action = a;
        }

        public void Execute(Object pa)
        {
            action();
        }

        public bool CanExecute(Object pa)
        {
            return true;
        }
        public event EventHandler CanExecuteChanged;
    }
}
